SRCS = $(wildcard *.cpp)
TARGETS = $(foreach src, $(SRCS), $(basename $(src)))

CFLAGS += -pipe -Wall -g
CDFLAGS += -lm -lpcre
CDFLAGS += -lX11 -lXtst

.PHONY : all clean

all : $(TARGETS)

$(TARGETS) : % : %.o
	g++ $(CDFLAGS) -o $@ $<


clean :
	-rm $(TARGETS) *.o
.SUFFIXES : .cpp

.cpp.o :
	$(CXX) $(CFLAGS) -c -o $@ $<
